<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

<%@include file="/common/head.jsp" %>

<c:set var="module" value="brandStyle"/>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
		<form action="${ctx }/admin/brandStyle/save?id=${n.id }" id="detail-form" class="form-horizontal" method="post">
			<div class="form-group">
                 <label class="col-sm-2 control-label">品牌</label>
                 <div class="col-sm-10">
                 	<input type="hidden" class="form-control" id="brand_id" name="brand.id" value="${n.brand.id }" />
                 	<input type="text" class="form-control" id="brand_name" name="brand.name" value="${n.brand.name }"
                 	
                 	onclick="bring({
							                 	url:'${ctx}/admin/brand/list',
							                 	name: 'name',
							                 	idInput: 'brand_id',
							                 	nameInput: 'brand_name'
							                 	})" />
                 </div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">风格</label>
                 <div class="col-sm-10">
                 	<select name="houseStyle.id" id="" class="form-control">
                 		<c:forEach items="${houseStyles }" var="t">
                 			<option value="${t.id }" ${n.houseStyle.id eq t.id ? 'selected' : '' }>${t.name }</option>
                 		</c:forEach>
                 	</select>
                 </div>
             </div>	
			<div class="form-group">
                 <label class="col-sm-2 control-label">推荐状态</label>
                 <div class="col-sm-10">
                 	<select name="recommon" class="form-control">
	                 	<c:forEach items="${rs }" var="rs">
	                 		<option <c:if test="${n.recommon eq hs.value }">selected="selected"</c:if> value="${rs.value }">${rs.remark }</option>
	                 	</c:forEach>
                 	</select>
                 </div>
             </div>	
        	
		</form>
</div>

<%@include file="/common/foot.jsp" %>
<script type="text/javascript">
$("select option[value='0']").remove();
</script>
</body>
</html>
